<%@ page import="com.pyrsana.faith.retreat.Retreat" %>

<div class="fieldcontain ${hasErrors(bean: retreatInstance, field: 'themeVerses', 'error')} ">
	<label for="themeVerses">
		<g:message code="retreat.themeVerses.label" default="Theme Verses" />
		
	</label>	
<ul class="one-to-many">
<g:each in="${retreatInstance?.themeVerses?}" var="t">
    <li><g:link controller="verse" action="show" id="${t.id}">${t?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="verse" action="create" params="['retreat.id': retreatInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'verse.label', default: 'Verse')])}</g:link>
</li>
</ul>

</div>

<div class="fieldcontain ${hasErrors(bean: retreatInstance, field: 'housings', 'error')} ">
	<label for="housings">
		<g:message code="retreat.housings.label" default="Housings" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${retreatInstance?.housings?}" var="h">
    <li><g:link controller="housing" action="show" id="${h.id}">${h?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="housing" action="create" params="['retreat.id': retreatInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'housing.label', default: 'Housing')])}</g:link>
</li>
</ul>

</div>

<div class="fieldcontain ${hasErrors(bean: retreatInstance, field: 'attendees', 'error')} ">
	<label for="attendees">
		<g:message code="retreat.attendees.label" default="Attendees" />
		
	</label>
	
<ul class="one-	to-many">
<g:each in="${retreatInstance?.attendees?}" var="a">
    <li><g:link controller="registration" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="registration" action="create" params="['retreat.id': retreatInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'registration.label', default: 'Registration')])}</g:link>
</li>
</ul>

</div>

<div class="fieldcontain ${hasErrors(bean: retreatInstance, field: 'workshops', 'error')} ">
	<label for="workshops">
		<g:message code="retreat.workshops.label" default="Workshops" />
		
	</label>
	<g:select name="workshops" from="${com.pyrsana.faith.retreat.Workshop.list()}" multiple="multiple" optionKey="id" size="5" value="${retreatInstance?.workshops*.id}" class="many-to-many"/>
</div>
